package demoMod.invincibleOne.relics;

import com.badlogic.gdx.graphics.Texture;
import com.megacrit.cardcrawl.actions.GameActionManager;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.GainEnergyAction;
import com.megacrit.cardcrawl.actions.common.RelicAboveCreatureAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.VulnerablePower;
import com.megacrit.cardcrawl.powers.WeakPower;
import demoMod.invincibleOne.InvincibleOneMod;
import demoMod.invincibleOne.powers.DoomPower;

public class HeavenScepter extends AbstractInvincibleRelic {
    public static final String ID = InvincibleOneMod.makeID("HeavenScepter");
    public static final Texture IMG = new Texture(InvincibleOneMod.getResourcePath("relics/HeavenScepter.png"));
    public static final Texture OUTLINE_IMG = new Texture(InvincibleOneMod.getResourcePath("relics/HeavenScepter.png"));

    public HeavenScepter() {
        super(ID, IMG, OUTLINE_IMG, RelicTier.SPECIAL, LandingSound.FLAT);
        this.counter = 0;
    }

    @Override
    public String getUpdatedDescription() {
        return DESCRIPTIONS[0];
    }


    @Override
    public void atTurnStart() {
        if (TaskGoal.combatTurn == 1 && counter > 0) {
            this.flash();
            AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(AbstractDungeon.player, AbstractDungeon.player, new DoomPower(AbstractDungeon.player, this.counter - 3)));
        }
    }
}
